<?php
`net start mysql`;//启动数据库
`git config --global user.name "来汛"`;//设置提交的用户名及邮箱
`git config --global user.email "come-xun@126.com"`;
$db=new PDO("mysql:host=localhost", 'root', '12qwas');
$db->setAttribute(PDO::ATTR_DEFAULT_FETCH_MODE,PDO::FETCH_ASSOC);
$db->exec('create database if not exists db2');
$db->exec('use db2');
$db->exec("create table if not exists students (xh varchar(9) not null primary key,name varchar(50), tel varchar(11), pwd varchar(20) default '12345')");
$r=$db->exec('delete from students');
echo "删除记录个数：{$r}条\n";
$r=$db->exec("insert into students(xh,name,tel) values
				 ('213110601','马武','11111111111'),
				 ('213110602','唐三','22222222222'),
				 ('213110603','萧炎','33333333333'),
				 ('213110701','林动','44444444444')");
echo "插入记录：{$r}条\n";